package com.tyson.context.controller;


import com.tyson.common.utils.R;
import com.tyson.context.entity.BlBlog;
import com.tyson.context.entity.BlType;
import com.tyson.context.service.BlTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 帖子类型表 前端控制器
 * </p>
 *
 * @author 沈统顺
 * @since 2021-02-12
 */
@RestController
@RequestMapping("/context/type")
public class BlTypeController {
    @Autowired
    BlTypeService blTypeService;
    @GetMapping("list")
    public R list(){
        List<BlType> blTypeList = blTypeService.listAll();
        return R.ok().data("list",blTypeList);
    }
}

